package tech.aistar.service.services.impl;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import tech.aistar.entity.Services;
import tech.aistar.mapper.services.ServiceMapper;
import tech.aistar.service.services.IService;
import tech.aistar.vo.ServicesAndNameQueryVo;

import java.util.List;

/**
 * Created by Administrator on 2019/10/11 0011.
 */
@Repository
public class ServiceMapperImpl implements IService {

    @Autowired
    private ServiceMapper serviceMapper;


    @Override
    public List<Services> findId(Integer userinfoId) {
        return null;
    }

    @Override
    public void sSave(Services services) {
        serviceMapper.sSave(services);
    }

    @Override
    public PageInfo<Services> findAll(Integer userinfoId,Integer pageNum, Integer pageSize) {
        PageHelper.startPage(pageNum,pageSize);

        List<Services> pageList = serviceMapper.findId(userinfoId);

        PageInfo<Services> pageInfo = new PageInfo<>(pageList);
        return pageInfo;
    }
}
